package cn.ac.jaas.isc.vegetable.pbms.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 张高昌
 * @date 2022-05-02 11:14:42
 */
@Data
@TableName("arc_equipment")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "设备表")
public class ArcEquipment extends Model<ArcEquipment> {

    private static final long serialVersionUID = 1L;

    /**
     * 设备id
     */
    @TableId
    @ApiModelProperty(value = "设备id")
    private Integer equipmentId;

    /**
     * 温室id
     */
    @NotNull(message = "温室不能为空")
    @ApiModelProperty(value = "温室id")
    private Integer houseId;

    /**
     * 设备名称
     */
    @NotBlank(message = "设备名称不能为空")
    @Length(min = 2, max = 60, message = "设备名称必须由2~60个字组成")
    @ApiModelProperty(value = "设备名称")
    private String equipmentName;

    /**
     * 设备识别码
     */
    @ApiModelProperty(value = "设备识别码")
    private String identificationCode;

    /**
     * 设备编码
     */
    @NotBlank(message = "设备编码不能为空")
    @Length(min = 2, max = 30, message = "设备编码必须由2~60个字组成")
    @ApiModelProperty(value = "设备编码")
    private String equipmentCode;

    /**
     * 节点地址
     */
    @ApiModelProperty(value = "节点地址")
    private String nodeAddress;

    /**
     * 设备类型编码
     */
    @NotNull(message = "设备类型编码不能为空")
    @ApiModelProperty(value = "设备类型编码")
    private String equipmentTypeCode;

    /**
     * 型号编码
     */
    @NotNull(message = "型号编码不能为空")
    @ApiModelProperty(value = "型号编码")
    private String modelCode;

    /**
     * 厂商编码
     */
    @NotNull(message = "厂商编码不能为空")
    @ApiModelProperty(value = "厂商编码")
    private String manufacturerCode;

    /**
     * 设备状态 [1:使用|2:在库|3:报废|4:丢失][arc_equipment_status]
     */
    @NotNull(message = "设备状态不能为空")
    @ApiModelProperty(value = "设备状态 [1:使用|2:在库|3:报废|4:丢失][arc_equipment_status]")
    private Integer status;

    /**
     * 启用状态 [0:停用|1:启用][arc_equipment_run_status]
     */
    @NotNull(message = "启用状态不能为空")
    @ApiModelProperty(value = "启用状态 [0:停用|1:启用][arc_equipment_run_status]")
    private Integer runStatus;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    private String userName;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 是否删除[0:未删除|1:已删除][sys_del_flag]
     */
    @ApiModelProperty(value = "是否删除[0:未删除|1:已删除][sys_del_flag]")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private Integer updateUser;

}
